.class public Lcom/instagram/android/feed/a/b/o;
.super Ljava/lang/Object;
.source "MediaHeaderViewBinder.java"


# instance fields
.field private final a:Landroid/content/Context;

.field private final b:Landroid/support/v4/app/r;

.field private final c:Lcom/instagram/b/d;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/support/v4/app/r;Lcom/instagram/b/d;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 42
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 44
    iput-object p1, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    .line 45
    iput-object p2, p0, Lcom/instagram/android/feed/a/b/o;->b:Landroid/support/v4/app/r;

    .line 46
    iput-object p3, p0, Lcom/instagram/android/feed/a/b/o;->c:Lcom/instagram/b/d;

    .line 47
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/feed/a/b/o;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 33
    iget-object v0, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    return-object v0
.end method

.method public static a(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 50
    invoke-static {p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    sget v1, Lcom/facebook/ax;->row_feed_media_profile_header:I

    const/4 v2, 0x0

    invoke-virtual {v0, v1, p1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v0

    .line 52
    invoke-static {v0}, Lcom/instagram/android/feed/a/b/o;->a(Landroid/view/View;)Lcom/instagram/android/feed/a/b/t;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 53
    return-object v0
.end method

.method static a(Landroid/view/View;)Lcom/instagram/android/feed/a/b/t;
    .locals 2
    .parameter

    .prologue
    .line 57
    new-instance v1, Lcom/instagram/android/feed/a/b/t;

    invoke-direct {v1}, Lcom/instagram/android/feed/a/b/t;-><init>()V

    .line 58
    sget v0, Lcom/facebook/aw;->row_feed_photo_profile_imageview:I

    invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/mediacache/CircularImageView;

    iput-object v0, v1, Lcom/instagram/android/feed/a/b/t;->a:Lcom/instagram/android/mediacache/CircularImageView;

    .line 61
    sget v0, Lcom/facebook/aw;->row_feed_photo_profile_name:I

    invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/instagram/android/feed/a/b/t;->b:Landroid/widget/TextView;

    .line 62
    sget v0, Lcom/facebook/aw;->row_feed_photo_profile_metalabel_glyph:I

    invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/instagram/android/feed/a/b/t;->c:Landroid/widget/ImageView;

    .line 65
    sget v0, Lcom/facebook/aw;->row_feed_photo_profile_metalabel:I

    invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/instagram/android/feed/a/b/t;->d:Landroid/widget/TextView;

    .line 66
    sget v0, Lcom/facebook/aw;->row_feed_photo_location:I

    invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    .line 67
    sget v0, Lcom/facebook/aw;->row_feed_photo_location_glyph:I

    invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/instagram/android/feed/a/b/t;->f:Landroid/widget/ImageView;

    .line 68
    return-object v1
.end method

.method static synthetic b(Lcom/instagram/android/feed/a/b/o;)Lcom/instagram/b/d;
    .locals 1
    .parameter

    .prologue
    .line 33
    iget-object v0, p0, Lcom/instagram/android/feed/a/b/o;->c:Lcom/instagram/b/d;

    return-object v0
.end method

.method private b(Lcom/instagram/android/feed/a/b/t;Lcom/instagram/j/l;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 76
    iget-object v0, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 77
    invoke-virtual {p2}, Lcom/instagram/j/l;->N()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 78
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    sget v2, Lcom/facebook/at;->textview_location_foursquare:I

    invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getColor(I)I

    move-result v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 79
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->f:Landroid/widget/ImageView;

    sget v1, Lcom/facebook/av;->stream_photo_header_glyph_location:I

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 80
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    new-instance v1, Lcom/instagram/android/feed/a/b/p;

    invoke-direct {v1, p0, p2}, Lcom/instagram/android/feed/a/b/p;-><init>(Lcom/instagram/android/feed/a/b/o;Lcom/instagram/j/l;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 91
    :goto_0
    return-void

    .line 87
    :cond_0
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    sget v2, Lcom/facebook/at;->textview_location_user:I

    invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getColor(I)I

    move-result v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 88
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->f:Landroid/widget/ImageView;

    sget v1, Lcom/facebook/av;->stream_photo_header_glyph_location_undefined:I

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 89
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_0
.end method

.method static synthetic c(Lcom/instagram/android/feed/a/b/o;)Landroid/support/v4/app/r;
    .locals 1
    .parameter

    .prologue
    .line 33
    iget-object v0, p0, Lcom/instagram/android/feed/a/b/o;->b:Landroid/support/v4/app/r;

    return-object v0
.end method

.method private c(Lcom/instagram/android/feed/a/b/t;Lcom/instagram/j/l;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 98
    iget-object v0, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 99
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->f:Landroid/widget/ImageView;

    sget v2, Lcom/facebook/av;->stream_photo_header_glyph_location:I

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 100
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    sget v2, Lcom/facebook/at;->textview_location_foursquare:I

    invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getColor(I)I

    move-result v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 101
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    new-instance v1, Lcom/instagram/android/feed/a/b/q;

    invoke-direct {v1, p0, p2}, Lcom/instagram/android/feed/a/b/q;-><init>(Lcom/instagram/android/feed/a/b/o;Lcom/instagram/j/l;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 107
    return-void
.end method


# virtual methods
.method public a(Lcom/instagram/android/feed/a/b/t;Lcom/instagram/j/l;)V
    .locals 6
    .parameter
    .parameter

    .prologue
    const/16 v5, 0x8

    const/4 v4, 0x0

    .line 113
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->a:Lcom/instagram/android/mediacache/CircularImageView;

    invoke-virtual {p2}, Lcom/instagram/j/l;->b()Lcom/instagram/android/model/b/e;

    move-result-object v1

    invoke-virtual {v1}, Lcom/instagram/android/model/b/e;->j()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/android/mediacache/CircularImageView;->setUrl(Ljava/lang/String;)V

    .line 114
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->a:Lcom/instagram/android/mediacache/CircularImageView;

    new-instance v1, Lcom/instagram/android/feed/a/b/r;

    invoke-direct {v1, p0, p2}, Lcom/instagram/android/feed/a/b/r;-><init>(Lcom/instagram/android/feed/a/b/o;Lcom/instagram/j/l;)V

    invoke-virtual {v0, v1}, Lcom/instagram/android/mediacache/CircularImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 131
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->b:Landroid/widget/TextView;

    invoke-static {}, Lcom/instagram/j/q;->a()Lcom/instagram/j/q;

    move-result-object v1

    invoke-virtual {v1, p2}, Lcom/instagram/j/q;->b(Lcom/instagram/j/l;)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 132
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->b:Landroid/widget/TextView;

    new-instance v1, Landroid/text/method/LinkMovementMethod;

    invoke-direct {v1}, Landroid/text/method/LinkMovementMethod;-><init>()V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setMovementMethod(Landroid/text/method/MovementMethod;)V

    .line 136
    invoke-virtual {p2}, Lcom/instagram/j/l;->B()Lcom/instagram/venue/model/Venue;

    move-result-object v0

    .line 137
    if-eqz v0, :cond_2

    invoke-virtual {v0}, Lcom/instagram/venue/model/Venue;->b()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_2

    .line 138
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setVisibility(I)V

    .line 139
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->f:Landroid/widget/ImageView;

    invoke-virtual {v1, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 140
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/instagram/venue/model/Venue;->b()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 142
    invoke-virtual {p2}, Lcom/instagram/j/l;->L()Lcom/instagram/j/n;

    move-result-object v0

    sget-object v1, Lcom/instagram/j/n;->c:Lcom/instagram/j/n;

    if-ne v0, v1, :cond_1

    .line 143
    invoke-direct {p0, p1, p2}, Lcom/instagram/android/feed/a/b/o;->c(Lcom/instagram/android/feed/a/b/t;Lcom/instagram/j/l;)V

    .line 153
    :cond_0
    :goto_0
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->c:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;

    .line 156
    iget-object v1, p0, Lcom/instagram/android/feed/a/b/o;->c:Lcom/instagram/b/d;

    invoke-static {p2, v1}, Lcom/instagram/h/a/e;->a(Lcom/instagram/j/l;Lcom/instagram/b/d;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 157
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->d:Landroid/widget/TextView;

    invoke-virtual {p2}, Lcom/instagram/j/l;->Z()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 158
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->d:Landroid/widget/TextView;

    iget-object v2, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    sget v3, Lcom/facebook/at;->link_color:I

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 159
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->d:Landroid/widget/TextView;

    new-instance v2, Lcom/instagram/android/feed/a/b/s;

    invoke-direct {v2, p0, p2}, Lcom/instagram/android/feed/a/b/s;-><init>(Lcom/instagram/android/feed/a/b/o;Lcom/instagram/j/l;)V

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 169
    invoke-virtual {p2}, Lcom/instagram/j/l;->aa()Z

    move-result v1

    if-eqz v1, :cond_3

    .line 170
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->c:Landroid/widget/ImageView;

    sget v2, Lcom/facebook/av;->starred:I

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 171
    iget-object v1, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    const/4 v2, 0x4

    invoke-static {v1, v2}, Lcom/instagram/n/k;->a(Landroid/util/DisplayMetrics;I)F

    move-result v1

    float-to-int v1, v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->rightMargin:I

    .line 172
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->c:Landroid/widget/ImageView;

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 183
    :goto_1
    return-void

    .line 144
    :cond_1
    invoke-virtual {p2}, Lcom/instagram/j/l;->L()Lcom/instagram/j/n;

    move-result-object v0

    sget-object v1, Lcom/instagram/j/n;->b:Lcom/instagram/j/n;

    if-ne v0, v1, :cond_0

    .line 145
    invoke-direct {p0, p1, p2}, Lcom/instagram/android/feed/a/b/o;->b(Lcom/instagram/android/feed/a/b/t;Lcom/instagram/j/l;)V

    goto :goto_0

    .line 148
    :cond_2
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->e:Landroid/widget/TextView;

    invoke-virtual {v0, v5}, Landroid/widget/TextView;->setVisibility(I)V

    .line 149
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->f:Landroid/widget/ImageView;

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0

    .line 174
    :cond_3
    iget-object v0, p1, Lcom/instagram/android/feed/a/b/t;->c:Landroid/widget/ImageView;

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1

    .line 177
    :cond_4
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->d:Landroid/widget/TextView;

    invoke-virtual {p2}, Lcom/instagram/j/l;->A()Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 178
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->d:Landroid/widget/TextView;

    iget-object v2, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    sget v3, Lcom/facebook/at;->timestamp_color:I

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 179
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->c:Landroid/widget/ImageView;

    sget v2, Lcom/facebook/av;->stream_photo_timestamp:I

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 180
    iget-object v1, p1, Lcom/instagram/android/feed/a/b/t;->c:Landroid/widget/ImageView;

    invoke-virtual {v1, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 181
    iget-object v1, p0, Lcom/instagram/android/feed/a/b/o;->a:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    const/4 v2, 0x1

    invoke-static {v1, v2}, Lcom/instagram/n/k;->a(Landroid/util/DisplayMetrics;I)F

    move-result v1

    float-to-int v1, v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->rightMargin:I

    goto :goto_1
.end method
